int arrSum(int* arr, int start, int end){
	int i, res = 0;
	for(i = start; i < start + end; i++)
	{
		res += arr[i];
	}
	
	return res;
}
int sumOddLengthSubarrays(int* arr, int arrSize){
    int i = 0;
    int j = 0;
    int k = 0;
    int ans = 0;

    for(i = 1; i <= arrSize; i += 2){
        for(j = 0; j < i; j += i){
            for(k = j; k < arrSize - i + 1;k++){
                ans += arrSum(arr, k ,i);
            }
        }
    }
    return ans;
}